home *** CD-ROM | disk | FTP | other *** search
/ H4CK3R 14 / hacker14.iso / programacao / visual / perl.exe / {app} / Syntax Parser Elements.pl < prev    next >
Encoding:
Text File  |  2003-01-11  |  859 b   |  33 lines

  1. use CGI;        # "Reserved Word" - "Identifier"
  2. my $a;            # "Perl Declared Identifier"
  3. $int = 5;        # "Integer"
  4. $float = 5.5;    # "Float"
  5. print "test";    # "Perl internal function" & "String"
  6. # All the () {} $ @ % ; etc are "delimiters"
  7.  
  8. sub test {        # "Reserved Word" - "Perl Declared Identifier"
  9.  my $b;            # "Perl Variables"
  10.  $a = 1;         # This has "Declared Identifier" style
  11. }                 # Because $a has been declared
  12.  
  13. s/bar/foo/;        # or multiline like:
  14. s(foo)            # "RegExp Pattern"
  15.  (bar);            # "RegExp Replacement"
  16.  
  17. print            # "Perl internal function"
  18. q|<a 
  19. href=
  20. "http://url">
  21. mysite
  22. <a>|;    
  23. # The above three lines were encoded with
  24. # HTML style, because html was detected. They are:
  25. # Line 18: "HTML Tags" (also line 22)
  26. # Line 19: "HTML Params"
  27. # Line 20: "String"
  28. # Line 21: "Identifiers"
  29.  
  30. # Next are "Pod" and "Pod Tags" styles
  31. =pod
  32. pod
  33. =cut